home *** CD-ROM | disk | FTP | other *** search
- /*
- * Copyright (C) 1994, Silicon Graphics, Inc.
- * All Rights Reserved.
- *
- * This is UNPUBLISHED PROPRIETARY SOURCE CODE of Silicon Graphics, Inc.;
- * the contents of this file may not be disclosed to third parties, copied or
- * duplicated in any form, in whole or in part, without the prior written
- * permission of Silicon Graphics, Inc.
- *
- * RESTRICTED RIGHTS LEGEND:
- * Use, duplication or disclosure by the Government is subject to restrictions
- * as set forth in subdivision (c)(1)(ii) of the Rights in Technical Data
- * and Computer Software clause at DFARS 252.227-7013, and/or in similar or
- * successor clauses in the FAR, DOD or NASA FAR Supplement. Unpublished -
- * rights reserved under the Copyright Laws of the United States.
- */
- ////////////////////////////////////////////////////////////////
- // CardInfo.h --
- ////////////////////////////////////////////////////////////////
- #ifndef CARDINFO_H
- #define CARDINFO_H
-
- #include "Attributes.h"
-
- #include "OkStr.h"
- #include "Database.h"
-
- class CardInfo : public Persistent {
-
- public:
- CardInfo( ObjAddr obj );
- CardInfo( const char* name=NULL, ObjAddr obj=NULL );
- ~CardInfo();
- void save();
-
- Boolean containString( OkStr s,
- Boolean caseSensitive=FALSE,
- Boolean srchNotesToo=FALSE );
- static Boolean ContainString( OkStr s, OkStr target,
- Boolean caseSensitive=FALSE );
-
- // Access funcs.
- OkStr name() const { return _name; }
- OkStr phone1() const { return _phone1; }
- OkStr phone2() const { return _phone2; }
- OkStr fax() const { return _fax; }
- OkStr mobilePhone() const { return _mobilePhone; }
- OkStr email() const { return _email; }
-
- OkStr addressLine1() const { return _addressLine1; }
- OkStr addressLine2() const { return _addressLine2; }
- OkStr city() const { return _city; }
- OkStr state() const { return _state; }
- OkStr zip() const { return _zip; }
- OkStr country() const { return _country; }
-
- Boolean attribute( int i ) const { return _attribute[ i ]; }
-
- OkStr notes() const { return _notes; }
-
-
- void setName( OkStr name ) { _name = name; }
- void setPhone1( OkStr phone1 ) { _phone1 = phone1; }
- void setPhone2( OkStr phone2 ) { _phone2 = phone2; }
- void setFax( OkStr fax ) { _fax = fax; }
- void setMobilePhone( OkStr mobilePhone ) { _mobilePhone = mobilePhone; }
- void setEmail( OkStr email ) { _email = email; }
-
- void setAddressLine1( OkStr ln1 ) { _addressLine1 = ln1; }
- void setAddressLine2( OkStr ln2 ) { _addressLine2 = ln2; }
- void setCity( OkStr city ) { _city = city; }
- void setState( OkStr state ) { _state = state; }
- void setZip( OkStr zip ) { _zip = zip; }
- void setCountry( OkStr country ) { _country = country; }
-
- void setAttribute( int i, Boolean b ) { _attribute[ i ] = b; }
-
- void setNotes( const char* notes ) { _notes = notes; }
-
-
- protected:
- // Persistent funcs.
- void Read();
- void Write();
-
- private:
-
- OkStr _name;
- OkStr _phone1;
- OkStr _phone2;
- OkStr _fax;
- OkStr _mobilePhone;
- OkStr _email;
-
- OkStr _addressLine1;
- OkStr _addressLine2;
- OkStr _city;
- OkStr _state;
- OkStr _zip;
- OkStr _country;
-
- Boolean _attribute[ ATTR_COUNT ];
-
- OkStr _notes;
-
- void init( const char* name, ObjAddr obj );
-
- };
-
- #endif
-